package org.yefei.homeworkday17.three;

public class Computer {
	private String brand;

	public Computer(String brand) {
		this.brand = brand;
	}

	private Cpu cpu;
	private HardDisk hardDisk;
	private Storage storage;

	public void setCpu(Cpu c) {
		this.cpu = c;
	}

	public void setHardDisk(HardDisk h) {
		this.hardDisk = h;
	}

	public void setStorage(Storage s) {
		this.storage = s;
	}

	@Override
	public String toString() {
		return "电脑的品牌是：" + brand + "\n" + cpu.showCpu() + "\n" + hardDisk.showHardDisk() + "\n" + storage.showStorage();
	}
}
